<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>节点</title>
	<style type="text/css">
 		.box{
 			height: 400px;
 			width: 400px;
 			background: blue;
 		}
 		.son{
 			height: 200px;
 			width: 200px;
 			background: red;
 		}
 		.box1{
 			height: 400px;
 			width: 400px;
 			background: #a349a4;
 		}

	</style>
	<script type="text/javascript">
	// window.onload=function(){
	// 	son=document.getElementsByClassName('son');
	// 	son[0].parentNode.parentNode.childNodes[] .style.backgroundColor="yellow";
	// }
	// 
	// 
	window.onload=function(){
		del=document.getElementsByClassName('del');
		for( var i= 0;i<del.length;i++){

			
				run(i);
			
		}
		function run(x){
			del[x].onclick=function(){
				del[x].parentNode.parentNode.style.display='none';

			}

		}


	}

	 </script>
</head>
<body>
<!-- <span>你是傻逼吗</span>
<div class="box">

	<div class="son">
	son
	</div>

</div>
<div class="box1"></div>
	 -->
	 <table border="1" style="text-align:center">
	 	<tr>
	 		<td>姓名</td>
	 		<td>性别</td>
	 		<td>年龄</td>
	 		<td>操作</td>
	 	</tr>
	 	<tr>
	 		<td>1小明</td>
	 		<td>男</td>
	 		<td>18</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>
	 	<tr>
	 		<td>2小芳</td>
	 		<td>女</td>
	 		<td>17</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>
	 	<tr>
	 		<td>3小芳</td>
	 		<td>女</td>
	 		<td>17</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>
	 	<tr>
	 		<td>4小明</td>
	 		<td>男</td>
	 		<td>18</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>
	 	<tr>
	 		<td>5小明</td>
	 		<td>男</td>
	 		<td>18</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>
	 	<tr>
	 		<td>6小明</td>
	 		<td>男</td>
	 		<td>18</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>
	 	<tr>
	 		<td>7小明</td>
	 		<td>男</td>
	 		<td>18</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>
	 	<tr>
	 		<td>8小明</td>
	 		<td>男</td>
	 		<td>18</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>
	 	<tr>
	 		<td>9小明</td>
	 		<td>男</td>
	 		<td>18</td>
	 		<td><input class="del" type="button" value="删除" />
	 		<input type="button" value="修改" /></td>
	 	</tr>		
		

	 </table>
</body>
</html>